package Day08_03;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class Test_finally {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
           fis = new FileInputStream("C:\\Users\\27142\\Documents\\东方科技学院钟细慧.docx");
           String s = null;
           s.toString();

            System.out.println("Hello 1");
        }
        catch(FileNotFoundException e){
            e.printStackTrace();
        }
        catch(NullPointerException e){
            e.printStackTrace();
        }
        catch(IOException e){
            e.printStackTrace();
        }
        finally {
            System.out.println("finally begin!");
            if(fis != null){
                try {
                    fis.close();
                }catch(IOException e){
                    e.printStackTrace();
                }
            }
        }
        System.out.println("finally out!");
    }
}
